This invention relates to cache systems. More particularly, this invention relates to the use of cache systems in a set top box environment for accessing hypertext markup language (HTML) documents.
Set top boxes typically provide an interface between a television display or peripheral and a multimedia source that includes audio and video content. In some instances, the set top box is integrated with the television. The set top boxes are connected by cable systems (coaxial, fiberoptic, etc.), satellite-based systems, and other terrestrial-based systems to one or more media providers. The multimedia sources predominantly provide video that contains moving images. In the future, set top boxes will also be required to interface with distributed communications systems such as the Internet.
When a user accesses the Internet, the user typically employs a web browser that issues hypertext transfer protocol (HTTP) requests using Transmission Control Protocol/Internet Protocol (TCP/IP) to a host server. The host server runs software that responds to the HTTP requests. When the user requests a web page, the host server retrieves the web page and sends it to the user over the Internet. Web pages or HTML documents are made up of HTML text plus images, audio, video, scripts, fonts, and other media types.
The current web page access times that are required to retrieve a requested web page are commercially unacceptable. Web users do not like to wait very long to load web pages into their browsers. As loading speed increases, the users tend to lose interest. Loading speed continues to be the number one problem of web browsers.
A cache management system for a set top box improves the loading speed of hypertext markup language (HTML) documents that are provided by web servers through a distributed communications system. The cache management system includes a set top box with a processor and memory that includes cache. HTML documents are stored in the cache. A cache manager manages the cache and calculates a removal factor for each of the HTML documents. The cache manager removes the HTML documents based on its removal factor until sufficient room is available for an additional HTML document when a user requests access to the additional HTML document and insufficient cache is available to store the additional HTML document. The cache manager keeps as many relevant documents as possible in the cache.
In other features of the invention, the removal factor is at least partially based on usage of the HTML documents such as a number of times that the HTML documents was used and how long since the HTML documents were last used.
In still other features of the invention, the removal factor is at least partially based on a size of the HTML documents, a file type of the HTML documents, whether the HTML documents are compressed or decompressed, and/or a developer-designated priority for the HTML documents.
In yet other features of the invention, the removal factor is calculated by multiplying a first factor by a first weight to generate a first product, a second factor by a second weight to generate a second product, and an nth factor by an nth weight to generate an nth product. The first, second and nth products are summed. The first, second and nth products can be normalized prior or after being summed.
In other features of the invention, a table is accessible by the cache manager and is stored in memory of the set top box. The HTML documents are arranged in an ordered list based on the removal factors.
In still other features of the invention, the cache manager employs hysteresis when removing the HTML documents from the cache to create room for the additional HTML document when the user requests access to the additional HTML document and insufficient cache is available to store the additional HTML document. The cache manager provides hysteresis by continuing to remove the HTML documents until a predetermined breathing room threshold is available.
Still other objects, features, and advantages will be readily apparent from the specification, the drawings, and the claims.